﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Face8280WebSocketServer.DB.Device
{
    public class FaceDeviceDetail_PageModel
    {
        /// <summary>
        /// 主键
        /// </summary>
        public int ID { get; set; }

        /// <summary>
        /// 设备 SN
        /// </summary>
        public string DeviceID { get; set; } 

        /// <summary>
        /// 设备名称
        /// </summary>
        public string DeviceName { get; set; }

        public string DeviceIP { get; set; }

        public int DevicePort { get; set; }


        public byte ConnectType { get; set; }
        /// <summary>
        /// 出入类型 0,入门；1，出门
        /// </summary>
        public int ParameterAccessType { get; set; }

        /// <summary>
        /// 开门保持时间 1-65535（s）
        /// </summary>
        public int ParameterKeepOpenDoor { get; set; }

        /// <summary>
        /// 免验证开门 1--启用；0--禁用
        /// </summary>
        public int ParameterLaissezSwitch { get; set; }


        /// <summary>
        /// 生产日期
        /// </summary>
        public string ParameterProductionDate { get; set; }


        /// <summary>
        /// 固件版本信息
        /// </summary>
        public string ParameterFirmwareMsg { get; set; }


        #region 在线状态

        /// <summary>
        /// 最近保活包时间
        /// </summary>
        public DateTime LastKeepaliveTime { get; set; }  // 是


        /// <summary>
        /// 最近一次请求API时间
        /// </summary>
        public DateTime OnlineTime { get; set; }  // 是


        /// <summary>
        /// 门状态  0--无门磁；1--门开；2--门关
        /// </summary>
        public int DoorStatus { get; set; }


        /// <summary>
        /// 设备报警状态  0--无报警；1--消防报警；2--门磁报警；3--开门超时报警；4--黑名单报警
        /// </summary>
        public int AlarmStatus { get; set; }

        /// <summary>
        /// 同步状态
        /// 0--未同步；1--已同步
        /// </summary>
        public int UploadStatus { get; set; }

        /// <summary>
        /// 同步时间
        /// </summary>
        public DateTime UploadStatusTime { get; set; }
        #endregion
    }
}
